Enhancing collective entanglement witnesses through correlation with state purity

This research analyzes the adverse impact of white noise on collective quantum measurements and argues that such noise poses a significant obstacle for the otherwise straightforward deployment of collective measurements in quantum communications. Our findings then suggests addressing this issue by correlating outcomes of these measurements with quantum state purity. To test the concept, a support vector machine is employed to boost the performance of several collective entanglement witnesses by incorporating state purity into the classification task of distinguishing entangled states from separable ones. Furthermore, the application of machine learning allows to optimize specificity of entanglement detection given a target value of sensitivity. A response operating characteristic curve is reconstructed based on this optimization and the area under curve calculated to assess the efficacy of the proposed model. Finally, we test the presented approach on an experimental dataset of Werner states.


I. INTRODUCTION
Collective quantum measurements, which are measurements performed simultaneously on multiple copies of the investigated state, are an invaluable tool in quantum state analysis.Since the pioneering experimental demonstration in 2005 [1], collective measurements have been instrumental in practical implementation of a number of entanglement witnesses [2][3][4][5][6][7][8][9] and to infer quantum state purity or fidelity [10,11].The key advantage of these measurements lies in the projection of subsystems from different copies of the examined state onto a common entangled state (see nonlocal projection in conceptual diagram in Figure 1).Thanks to these nonlocal projections, collective measurements outperform ordinary single-copy measurements in terms of sensitivity (e.g. the volume of detected entangled states [4]) or in the efficiency in achieving set tasks with fewer measurements [8,9].Notably, the required number of collective measurements does not grow as prohibitively fast with the size of the Hilbert space as is the case with standard quantum state tomography.
Application-wise, collective measurements hold particular appeal in conjunction with entanglement distribution in quantum networks.Their layout (visualized in Figure 1) aligns with the topology of entanglement swapping making collective measurements straightforwardly deployable in quantum repeaters [12], relays [13] and in teleportation-based quantum communications networks [14,15].For instance, research has demonstrated applicability of collective measurements for a rapid and practical diagnostics of the entanglement * k.lemr@upol.czFIG. 1. Conceptual scheme of collective measurement with n = 1 nonlocal projections.Imperfections in the setup can be modelled by insertion of two noisy channels.The effect of these channels can be described by two equivalent strategies: (a) the two states ρ1 and ρ2 become noisy while the nonlocal measurement remains perfect or (b) perfect unperturbed states are subject to imperfect nonlocal projection.
swapping protocol [16].Moreover, direct measurement of Hilbert-Schmidt distance through collective measurements has been used to speed-up K-means classification algorithm [10].
As explained above, the power of collective measurements lies in the nonlocal projections.However, these projections are notably susceptible to white noise, and consequently, utilization of collective measurements in real-world quantum communications necessitates an assessment of their performance in the presence of that noise.In Sec.II of this paper, we analyze propaga-tion of the investigated state through noisy channel and document the adverse effect of the channel on collective measurements as the noise accumulates polynomially fast with the power corresponding to the number of copies projected onto a shared entangled state.Hence even a rather weakly perturbing realistic quantum channel can cause the projections to become local (no longer projecting on an entangled state) and, thus, the entire collective measurement looses its power.This effect is exemplified on the incapability of collectibility (a collective entanglement witness) to correctly detect entangled Werner state with a noise level above p = 1 − √ 3 2 ≈ 0.13 [3].Simultaneously, white noise is commonly associated with a reduction in the purity of transmitted quantum states.In this paper, we analyze the correlation between collective entanglement witnesses and purity of the states aiming to mitigate the influence of white noise on collective measurements.Our findings reveal that this way one can considerably enhance sensitivity of collective entanglement witnesses (true positive rate [17,18] or TPR) at a relatively small cost in decreased selectivity (false positive rate or FPR).A support vector machine is employed to find the optimal classification boundary between entangled and separable states, maximizing selectivity for a given value of sensitivity boost (see Sec. III).Furthermore, targeting several sensitivity values and identifying the corresponding selectivity allows us to reconstruct the entire receiver operating characteristic (ROC) curve, evaluating the method's effectiveness in terms of the area under this curve (AUC).Note that reconstructing the ROC curve would not be possible without the use of machine learning as analytical entanglement witnesses assume perfect selectivity (FPR= 0).However, such assumption is unrealistic due to the inevitable technical imperfections in practical conditions, at least such as detection shot noise [19].Our analysis of the ROCs contributes to the assessment of practicality of collective entanglement witnesses for near-future quantum communications networks.

II. VULNERABILITY OF COLLECTIVE MEASUREMENTS TO WHITE NOISE
In this section, we demonstrate that collective measurements are vulnerable to the presence of noise, in particular white noise.Let us consider a simple scenario illustrated in the Figure 1 and assume that two copies of a Bell state ρ1 = ρ2 = P+ i=0 |ii⟩) are subject to the collective measurement.Imperfections in the procedure are modelled by two channels introducing the noise with probability p.There are two equivalent strategies that can be used to incorporate the effect of noise on the outcome of collective measurements.In strategy (a) we add noise to the investigated states ρ1 , ρ2 that are then tested in a perfect collective measurement.In the second strategy (b), both noisy channels are added to the nonlocal measurement projector ŜB1,B2 turning it into a POVM.In this strategy, perfect Bell states ρi are measured by means of this POVM.
To prove this, let us first define the probabilities of collective projections, which in the next section will be used as a central quantity in the analyzed nonclassical witnesses.The probabilities of collective projections are given by where Πi stands for local projection, ŜB1,B2 represents the two-qubit collective measurement, and χAi,Bi denotes the Bell state ρi already affected by the noise.Here, indexes A i and B i are used to denote the first and the second qubit of analyzed state.
Note that by virtue of the Jamiołkowski isomorphism [20], the noisy channel χ can be written as ) † a completely positive map (see e.g.[21]).Then, with straightforward calculations, one can write (1) Using this equation and the cyclic property of the trace function, one gets where the noisy collective measurement ΩB1,B2 = k1,k2 (Γ B2 ) is the mathematical representation of the strategy (b).Note that ΩB1,B2 accumulates noise from both channels.Similar calculations can be made for C( ΠA1 , ΠA2 ) showing that this quantity is, however, invariant to noise as Γ is trace-preserving (i.e.
It is worth mentioning that the above considerations apply to an arbitrary state χ, not just noisy Bell states.
Let us now consider a particular, yet practical, situation when Γ stands for a depolarizing channel [22] and ŜB1,B2 = P+ B1,B2 .In this case, the Bell state is transformed into the Werner state with visibility v = (1 − p) On the other hand, in the second strategy (b) one gets i.e. a POVM described by the Werner state with visibility Consider that the Werner state becomes separable for v ≤ 1 3 and that projecting on a separable state removes the advantage of collective measurements as such measurement can be decoupled into a series of local singlestate copy measurements.The threshold v = 1 3 is reached if the channel introduces noise with probability p = 1 − 1 3 ≈ 0.42.As a consequence, entanglement witnesses based on collective measurement thus rather quickly lose their detection power when white noise is introduced.Note that for instance one of these witnesses, the collectibility, does not even detect all Bell nonlocal Werner states given by p < 1 − 1 √ 2 ≈ 0.29 [23].Collectibility only detects nonlocal correlations for Werner states with p < 1 − √ 3 2 ≈ 0.13 [3].

III. STATES GENERATION AND CLASSIFICATION
As demonstrated in the previous section, white noise has a negative effect on sensitivity of collective entanglement witnesses.Simultaneously, white noise also causes purity of examined quantum states to decrease.This leads us to propose the idea of restoring the performance of collective witnesses by correlating their values with purity of the examined states.To test this idea, the following three steps were implemented: (i) generation of random two-qubit states with uniform distribution in purity, (ii) estimation of three collective entanglement witnesses and purity of the state, (iii) classification of the states via machine learning.
States generation: First, we have generated random two-qubit states following the method described in Ref. [8,24] and also explained in detail in the Appendix.This method is based on the preparation of a diagonal matrix with uniformly distributed eigenvalues which is then subjected to a random two-qubit unitary evolution.The appropriate SU(4) unitary matrices are generated according to a procedure described in Ref. [25].Although such approach provides a uniform distribution of states with respect to the Haar measure, it does not provide a uniform distribution of state purity.There are also other methods for random state generation proposed in literature each leading to a different sampling of the states hence a different distribution of their purities [26,27].Several of these methods have been compared in the Appendix.To tackle this issue, we have decided to postselect from the generated states a subset of 2 million states with uniform distribution of purity.We consider this subset useful for benchmarking as it has considerably increased the presence of pure and quasi-pure states with respect to all tested vanilla random state generation algorithms.As a result, it favours entanglement detection based solely on the entanglement witnesses without correlating them with purity and hence the improvement ob- tained by incorporating purity into the decision is rather underestimated and certainly not overestimated.
Entanglement witnesses and purity: With the random states generated, we have calculated values of three typical collective entanglement witnesses that can be measured in the entanglement swapping geometry: (a) the collectibility, (b) the CHSH witness, and (c) the entropic witness.The collectibility as used in this article is defined as and with i, j ∈ {0, 1, +, −} denote logical and Hadamard basis states [3].Moreover, with the correlation matrix defined as [28] where σ m and σ n are Pauli operators, one can calculate the entropic witness [1,5] as and also the CHSH witness in the form [29,30] Purity of each state was also calculated.Note that purity can be directly measured using collective measurement on two copies of the investigated state using either the approach involving n = 2 nonlocal projections [1, 31] or in the entanglement swapping geometry following the idea to decompose nonlocal projection into a series of local measurements described in [28].
Classification of states: In the third step, each collective witness is paired with purity to obtain sets of feature vectors of length 2 to be then used for classification via machine learning (one set per witness).True labels for training were provided by the PPT criterion which is, for two-qubit states, a sufficient and necessary condition for entanglement.Note that in practical conditions the PPT criterion requires complete quantum state tomography to be performed and hence also the number of measurements exponentially growing with the size of the Hilbert space.Furthermore, negativity cannot be measured in a collective measurement on two copies of the investigated state [4].Distribution of the feature vectors for all three witnesses colored based on their true label is visualized in Figures 2 (a)-(c).Classification decision based solely on the analytical formulae of the three witnesses is visualized in these figures by dashed horizontal lines.Similarly, the states with purities < 1/3 that can not be entangled are delimited by a vertical dashed line [3].
Incorporating purity into the classification of the states and simultaneously tuning the required sensitivity and selectivity is a task that can not be tackled by means of analytical calculations.We thus resort to a machine learning-based approach.For all three witnesses, the set of feature vectors was split into two halves, one used to train support vector machine classifiers (SVC) and the other to test their performance.After experimenting with the hyper-parameters, we have decided to use the radial basis function (RBF) kernels with γ = 1.To speed-up the training, final classification of the test set is based on 11 hard-voting SVCs each trained on 1/11 of the training instances.To observe complete ROC curves, SVC were trained with 12 different class-based penalties for misclassification of entangled states w e ranging from 10 0.75 to 10 −1. 15 .Penalty for misclassification of separable states w s was adjusted always so that w s w e = 1 to maintain regularization.Specific values of these penalties affect sensitivity and selectivity of the SVC.To benchmark sensitivity, we have calculated the APR (analytical positive rate), i.e. the percentage of entangled states that a given witness is capable of identifying solely based on the analytical threshold without the usage of purity.Sensitivity of each SVC is then characterized by its TPR (true positive rate) and the resulting improvement factor (IF) Selectivity, on the other hand, is directly described by the false positive rate (FPR).Note that decisions based solely on the analytical formulae of the witnesses (without the SVC) have FPR = 0. Complete programming code in Python 3 using the ThunderSVM library [32] is available as Digital Supplement [33].

IV. RESULTS
For all combinations of the three witnesses and the 12 values of the class-based penalties w e , the SVC learned an optimal boundary between separable and entangled states in the feature space.Selection of these boundaries is depicted in Figures 2 (a)-(c) together with the corresponding improvement factors IF.Subsequently, we have obtained the confusion matrices for all these SVCs based on their decision on the test set (independent on the training set).TPR and FPR are then directly calculated from these matrices and plotted in Figure 3.By splitting the test set into 50 batches and evaluating them independently, we were able to estimate standard deviation of all the presented quantities.As a result we obtain  complete ROC curves for the idea of purity-enhanced classifications.Areas under curve (AUC) for all three witnesses are numerically calculated to evaluate the performance of this method (see Table I).We have found out, that using this approach, one can improve the TPR typically by a factor of 1.3 by only sacrificing less than 1 of selectivity (FPR < 0.001).Experimental imperfections and detection noise will inevitably cause even theoretically perfect witnesses to become imperfect.Considering that we believe that the price of a quite small selectivity drop is worth the tangibly increased sensitivity.Moreover, we have demonstrated that sensitivity can further be improved to near TPR close to 1 at the expense of decreased selectivity.This is well visible in the presented ROC curves whose AUC is, for all tested witnesses, greater than 0.9.For all numerical results see Tables II-IV in the Appendix.

V. CONCLUSIONS
We have demonstrated that white noise significantly impairs the performance of collective entanglement witnesses.This effect was documented on the example of collectibility loosing the capability to detect entangled Werner states when noise level exceeds 13 %.To mitigate this shortcoming, we have proposed to correlate the values of the collective witnesses with the state purity.Achieving this task analytically proves to be impractical, especially considering the need to tune detection selectivity.The solution lies in employing machine learning.Specifically we have implemented SVC models to optimize the decision boundary between entangled and separable states in the feature space spanned by the values of the entanglement witness and the states' purities.Our findings indicate that the range of detected entangled states can be expanded by a significant percentage at a minimal cost in sensitivity.Consequently, we believe that the idea of correlating entanglement witnesses with purity holds promise for practical near-future quantum communications, particularly in the context of entanglement swapping as showcased in this paper.Histogram of Hilbert-Schmidt distances of all combinations between 10.000 random states generated by QuTiP library with parameter density=0.75,Qiskit library with two different settings of parameter method='Hilbert-Schmidt','Bures' and by random rotation (RR) method (200 bins).
is fairly evaluated with respect to whatever conditions a user might have.
For generation of states uniformly distributed in purity we used the method of random global rotations because of its broad distribution in Hilbert-Schmidt distances.During states generation we control the values of purity (in 0.01 binning in interval [0.25,1]) and negativity (binary -N = 0 or N ̸ = 0) and discard states which occur too frequently.Finally we obtain two million density matrices for which the values of negativity, purity, Collectibility, CHSH and Entropic witnesses were calculated.The histograms of these values are presented in Figures 5,6  Support vector machine (SVM) tries to find the border hyperplane between entangled and separable states knowing the values of purity and the analytical value of an entanglement witness.To assess the SVM decision we can visualize density maps (in logarithmic scale) of purity and witnesses under the consideration for separable and entangled states separately, see Figures 8,9

B. TPR and FPR values
The decision of SVM results in a confusion matrix.On its diagonal lie true recognitions of entangled (true positive -TP) and separable (true negative -TN) states.Offdiagonal terms represent wrong assignment, false negative (FN) when entangled states were marked as separable and false positive (FP) whereas separable states were marked as entangled.True positive rate (TPR) and false positive rate (FPR) forming receiver operating characteristic (ROC) curve are calculated directly from the confusion matrix:
Upon training of the SVM the class-specific penalties w e and w s are tuned accordingly to homogeneously cover the entire interval of the ROC.For each point we can also calculate the improvement factor (IF) which quantifies how many more entangled states are recognized by the SVM when the value of purity is included in the decision.Naturally, this improvement is accompanied by the increments of misclassified separable states.
Results are summarized in Tabs.II -IV.

FIG. 2 .
FIG.2.Distribution of separable (light blue) and entangled (dark reddish) states in the feature space of the collective witnesses and purity is depicted for the three evaluated witnesses: (a) collectibility, (b) the CHSH witness, and (c) the entropic witness.As a sanity check, the analytical decision threshold at 0 is marked by the horizontal dashed line.Similarly the purity threshold below which all states must be separable at 1/3[3] is marked by vertical dashed line.Selected support vector machine decision boundaries are plotted by solid black lines labelled by the corresponding improvement factors IF.

FIG. 3 .
FIG.3.ROC curves for the purity-enhanced classification based on the three tested witnessed.Diagonal dashed line represents a naive (random) decision making while the filled markers correspond to SVCs trained with varying class-based penalties we and ws.Empty markers depict the APR, i.e. the TPR using solely the analytical formulae of the witnesses.
FIG. 4.Histogram of Hilbert-Schmidt distances of all combinations between 10.000 random states generated by QuTiP library with parameter density=0.75,Qiskit library with two different settings of parameter method='Hilbert-Schmidt','Bures' and by random rotation (RR) method (200 bins).

FIG. 5 .
FIG. 5. Purity histogram of training and testing dataset consisting of 2 millions of states (75 bins).

FIG. 7 .
FIG. 7. Histograms of entanglement witnesses applied on training and testing dataset consisting of 2 millions of states, a) Collectibility, b) CHSH and c) Entropic witnesses (100 bins).

FIG. 8 .FIG. 9 .
FIG. 8. Density maps of purity vs Collectibility of training and testing dataset consisting of a) 1 million separable and b) 1 million entangled states.

FIG. 10 .
FIG. 10.Density maps of purity vs Entropic witness of training and testing dataset consisting of a) 1 million separable and b) 1 million entangled states.

TABLE II .
Confusion matrices, values of true positive rates (TPR) and false positive rates (FPR) for different improvement factors (IF) of SVM learned on values of purity and the Collectibility.

TABLE III .
Confusion matrices, values of true positive rates (TPR) and false positive rates (FPR) for different improvement factors (IF) of SVM learned on values of purity and the CHSH witness.

TABLE IV .
Confusion matrices, values of true positive rates (TPR) and false positive rates (FPR) for different improvement factors (IF) of SVM learned on values of purity and the Entropic witness.